package clueless.client;

import java.awt.Button;
import java.awt.Color;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.ScrollPaneConstants;
import javax.swing.border.LineBorder;
import javax.swing.text.DefaultCaret;

import clueless.server.Server;
import clueless.utilities.*;
import clueless.utilities.Character;

public class Client extends Logger {

	private Connection m_connection;
	private GUI        m_GUI;
//	private String     m_character;
//	private int        m_numPlayers;
//
//	private ArrayList<Card> m_inHandCharacters;
//	private ArrayList<Card> m_inHandWeapons;
//	private ArrayList<Card> m_inHandRooms;
//	
//	private ArrayList<Card> m_ruledOutCharacters;
//	private ArrayList<Card> m_ruledOurWeapons;
//	private ArrayList<Card> m_ruledOutRooms;

	private volatile String m_response;
	
	public Client() {

		super("Client");
		m_connection = new Connection();
		m_GUI        = new GUI();

	}
	
	private void run() {
		
		// Connect to the server
		System.out.println("Client starting");
		//m_GUI.processMessage("Client starting");
		m_connection.connectToServer();
	
		// Request to join a game
	    BufferedReader userInputReader = new BufferedReader(new InputStreamReader(System.in));

	    //try {

	    	// Get desired number of players and character
	    	int numPlayers = m_GUI.getPreferredNumberOfPlayers("Enter desired number of players");
	    	m_GUI.setNumPlayers(numPlayers);
	    	String charName  = m_GUI.getPlayerDropList      ("Enter desired character");
	    	m_GUI.setCharacter(charName);

	    	// Request to join a game
	    	Message.sendJoinGameMessage(m_connection.getOutputStream(), numPlayers, charName);
	
			// Loop till Dec 21, 2012...
			String message;
	
			while(true) {
	
				message = Message.getMessage(m_connection.getInputStream());
				
				switch (Message.getMessageType(message)) {
					case Message.m_DISPLAY_TEXT :

						String textMessage = Message.getValue(Message.m_TEXT, message);
						m_GUI.processMessage(textMessage);
						break;

					case Message.m_PLAYER_CARDS :

						m_GUI.setStartingCards(Message.getMessageInfo(message));
						m_GUI.enableCards();
						break;

					case Message.m_CHARACTER_START_ROOMS :
					
						m_GUI.setStartPositions(Message.getMessageInfo(message));
//						ArrayList<StringPair> msgInfo = Message.getMessageInfo(message);
//						for (int i = 0; i < msgInfo.size()/2; i++) {
//						    String character = msgInfo.get(2*i    ).getValue();
//						    String startRoom = msgInfo.get(2*i  +1).getValue();
//							System.out.println(character + " starts in " + startRoom);
//						}
						break;

					case Message.m_START_TURN :
						
						//Get possible moves
						message = Message.getMessage(m_connection.getInputStream());
						String possibleMoves = Message.getValue(Message.m_TEXT, message);
						
						m_GUI.processMessage("Please take your turn.");
						m_GUI.processMessage("You can move or accuse.");

						m_GUI.enableButton("accuse");
						String[] moves = possibleMoves.split(",");
						for(int i=0; i< moves.length;i++)
							m_GUI.enableButton(moves[i]);
						
						m_response = "";
						while(m_response == "") {}
						System.out.println("Player moves : " + m_response);
						//m_GUI.processMessage("You moved " + m_response + ".");
						
						switch (m_response) {
						case "accuse":
							String character = m_GUI.getDropList("Select the accused character.", m_GUI.getSuspectCharacters());
							String weapon = m_GUI.getDropList("Select the accused weapon.", m_GUI.getSuspectWeapons());
							String room = m_GUI.getDropList("Select the accused room.", m_GUI.getSuspectRooms());
							Suggestion accusation = new Suggestion(character, weapon, room);
							Message.sendAccuseMessage(m_connection.getOutputStream(), accusation);
							break;
						case "up":
							//m_GUI.processMessage("You moved " + m_response + ".");
							//Message.sendMoveMessage(m_connection.getOutputStream(), m_response);
							//break;
						case "right":
							//m_GUI.processMessage("You moved " + m_response + ".");
							//Message.sendMoveMessage(m_connection.getOutputStream(), m_response);
							//break;
						case "left":
							//m_GUI.processMessage("You moved " + m_response + ".");
							//Message.sendMoveMessage(m_connection.getOutputStream(), m_response);
							//break;
						case "down":
							m_GUI.processMessage("You moved " + m_response + ".");
							Message.sendMoveMessage(m_connection.getOutputStream(), m_response);
							break;
						case "secret" :
							m_GUI.processMessage("You moved through a secret passage.");
							Message.sendMoveMessage(m_connection.getOutputStream(), m_response);
							break;
						}
						break;

					case Message.m_PLAYER_SUGGESTS :
						System.out.println("Please make a suggestion.");
						m_GUI.processMessage("Please make a suggestion.");
						String character = m_GUI.getDropList("Suggest a character.", m_GUI.getSuspectCharacters());
						String weapon = m_GUI.getDropList("Suggest a weapon.", m_GUI.getSuspectWeapons());
						String room = m_GUI.getMyRoom();
						m_GUI.processMessage("You suggested " + character + " in the " + room + " with the " + weapon + ".");
						
						
						Suggestion suggestion = new Suggestion(character, weapon, m_GUI.getMyRoom());
						Message.sendSuggestMessage(m_connection.getOutputStream(), suggestion);
						break;
						
//						System.out.println("Please make suggestion.");
//						System.out.print("Enter suggestion character: ");
//						String character = userInputReader.readLine();
//						System.out.print("Enter suggestion weapon: ");
//						String weapon = userInputReader.readLine();
//						System.out.print("Enter suggestion room: ");
//						String room = userInputReader.readLine();
//						Suggestion suggestion = new Suggestion(character, weapon, room);
//						Message.sendSuggestMessage(m_connection.getOutputStream(), suggestion);
//						break;
					
					case Message.m_PLAYER_MOVES :
						character = Message.getValue(Message.m_CHARACTER, message);
						room = Message.getValue(Message.m_ROOM, message);
						System.out.println(character + " moved to " + room);
						m_GUI.processMessage(character + " moved to the " + room + ".");
						m_GUI.updateCharacterLocation(character, room);
						break;
					case Message.m_GET_REFUTE :
						character = Message.getValue(Message.m_CHARACTER, message);
						room = Message.getValue(Message.m_ROOM, message);
						weapon = Message.getValue(Message.m_WEAPON, message);
						
						String refute = m_GUI.getDropList("Please refute the suggestion of:\n" + character + " in the " + room + " with the " + weapon + ".",
								m_GUI.getPossibleCards(character, weapon, room));
						
						System.out.println("Please refute suggestion of = " + character + " in the " + room + " with the " + weapon);

						if (refute.equalsIgnoreCase("none")) {
							Message.sendCannotRefuteMessage(m_connection.getOutputStream());
						} else {
							Message.sendRefuteMessage(m_connection.getOutputStream(), refute);
						}
						break;
					case Message.m_PLAYER_REFUTES :
						textMessage = Message.getValue(Message.m_TEXT, message);
						System.out.println("Player refutes with " + textMessage);
						m_GUI.processMessage("A player refuted your suggestion with " + textMessage + ".");
						m_GUI.updateRuledOutCards(textMessage);
						break;
						
					case Message.m_ALL_PLAYERS_CANNOT_REFUTE :
						JOptionPane.showMessageDialog(null, "No player can your refute suggestion.");
						//System.out.println("No player can refute suggestion. Please make accusation.");

						//character = m_GUI.getDropList("Enter accused character", m_GUI.getAllCharacters());
						//weapon = m_GUI.getDropList("Enter accused weapon", m_GUI.getAllWeapons());
						//room = m_GUI.getDropList("Enter accused room", m_GUI.getAllRooms());
						//Suggestion accusation = new Suggestion(character, weapon, room);
						//Message.sendAccuseMessage(m_connection.getOutputStream(), accusation);
						break;

//						System.out.print("Enter accusation character: ");
//						character = userInputReader.readLine();
//						System.out.print("Enter accusation weapon: ");
//						weapon = userInputReader.readLine();
//						System.out.print("Enter accusation room: ");
//						room = userInputReader.readLine();
//						Suggestion accusation = new Suggestion(character, weapon, room);
//						Message.sendAccuseMessage(m_connection.getOutputStream(), accusation);
//						break;

					case Message.m_GAME_OVER :
						System.out.println("Game Over.");
						textMessage = Message.getValue(Message.m_TEXT, message);
						JOptionPane.showMessageDialog(null, textMessage);
						System.exit(0);
						break;
						
						
						
	
						
				}
						
			}
	    //}
		//catch (IOException ex) {
	    //	ex.printStackTrace();
	    //}
		
	}
	
	////////////
	// GUI class
	////////////
	public class GUI {

		private JFrame frmClueless;
		private JPanel pnlPlayerControlPanel;
		private JPanel pnlPlayerMarker;
		private JPanel pnlPlayerCards;
		private JTextField txtColonelMustard;
		private JTextField txtMissScarlet;
		private JTextField txtProfessorPlum;
		private JTextField txtMrGreen;
		private JTextField txtMrsWhite;
		private JTextField txtMrsPeacock;
		private JTextField txtCandlestick;
		private JTextField txtKnife;
		private JTextField txtLeadPipe;
		private JTextField txtRevolver;
		private JTextField txtRope;
		private JTextField txtWrench;
		private JTextField txtBallroom;
		private JTextField txtBilliardRoom;
		private JTextField txtConservatory;
		private JTextField txtDiningRoom;
		private JTextField txtHall;
		private JTextField txtKitchen;
		private JTextField txtLibrary;
		private JTextField txtLounge;
		private JTextField txtStudy;
		private JTextArea txtMessages;
		private JScrollPane txtMsgScroller;
		private JButton btnUp;
		private JButton btnRight;
		private JButton btnLeft;
		private JButton btnDown;
		private JButton btnUseSecretPassage;
		private JButton btnSuggest;
		private JButton btnAccuse;
		
		private int    m_numPlayers;
		private String m_character;

		private ArrayList<String> m_inHandCharacters;
		private ArrayList<String> m_inHandWeapons;
		private ArrayList<String> m_inHandRooms;
		
		private ArrayList<String> m_ruledOutCharacters;
		private ArrayList<String> m_ruledOutWeapons;
		private ArrayList<String> m_ruledOutRooms;
		
		private ArrayList<String> m_suspectCharacters;
		private ArrayList<String> m_suspectWeapons;
		private ArrayList<String> m_suspectRooms;

		private volatile String response = "nothing";
		private static final String path = "C:\\Users\\Matthew\\Documents\\605.401\\HCI Presentation\\Clue-Less Pics\\";
		
		private ArrayList<String> m_playerCharacters;
		private ArrayList<String> m_playerLocations;
		private ArrayList<Color> m_playerColors;
		
//		private Thread threadObject;
		private JLabel lblPlayerMarker;
		
		private GuiPanel pnlStudy						= new GuiRoom("Study",2,1);
		private GuiPanel pnlStudyToHall					= new GuiHall(0);
		private GuiPanel pnlHall 						= new GuiRoom("Hall",0,1);
		private GuiPanel pnlHallToLounge				= new GuiHall(0);
		private GuiPanel pnlLounge						= new GuiRoom("Lounge",1,1);
		
		private GuiPanel pnlStudyToLibrary 				= new GuiHall(1);
		private GuiPanel pnlHallToBillardRoom			= new GuiHall(1);
		private GuiPanel pnlLoungeToDiningRoom	 		= new GuiHall(1);
		
		private GuiPanel pnlLibrary						= new GuiRoom("Library",0,0);
		private GuiPanel pnlLibraryToBillardRoom		= new GuiHall(0);
		private GuiPanel pnlBillardRoom					= new GuiRoom("Billard Room",0,0);
		private GuiPanel pnlBillardRoomToDiningRoom		= new GuiHall(0);
		private GuiPanel pnlDiningRoom					= new GuiRoom("Dining Room",0,0);
		
		private GuiPanel pnlLibraryToConservatory		= new GuiHall(1);
		private GuiPanel pnlBillardRoomToBallroom		= new GuiHall(1);
		private GuiPanel pnlDiningRoomToKitchen			= new GuiHall(1);
		
		private GuiPanel pnlConservatory				= new GuiRoom("Conservatory",2,0);
		private GuiPanel pnlConservatoryToBallRoom		= new GuiHall(0);
		private GuiPanel pnlBallRoom					= new GuiRoom("Ballroom",0,0);
		private GuiPanel pnlBallRoomToKitchen			= new GuiHall(0);
		private GuiPanel pnlKitchen						= new GuiRoom("Kitchen",1,0);
		
		private ArrayList<GuiPanel> pnlAllRooms = new ArrayList<GuiPanel>();
		
		public void clearAllRooms() {
			for (GuiPanel room : pnlAllRooms) {
				room.clearPlayers();
			}
		}
		
		public GuiPanel getRoom(String roomName) {
			Map map = new Map();
			if (roomName.equals(map.getStudy().getMyRoom())) {
				return this.pnlStudy;
			} else if (roomName.equals(map.getHall().getMyRoom())) {
				return this.pnlHall;
			}  else if (roomName.equals(map.getLounge().getMyRoom())) {
				return this.pnlLounge;
			} else if (roomName.equals(map.getLibrary().getMyRoom())) {
				return this.pnlLibrary;
			} else if (roomName.equals(map.getBillardRoom().getMyRoom())) {
				return this.pnlBillardRoom;
			} else if (roomName.equals(map.getDiningRoom().getMyRoom())) {
				return this.pnlDiningRoom;
			} else if (roomName.equals(map.getConservatory().getMyRoom())) {
				return this.pnlConservatory;
			} else if (roomName.equals(map.getBallroom().getMyRoom())) {
				return this.pnlBallRoom;
			} else if (roomName.equals(map.getKitchen().getMyRoom())) {
				return this.pnlKitchen;
			} else if (roomName.equals(map.getHallBwtnStudyAndHall().getMyRoom())) {
				return this.pnlStudyToHall;
			} else if (roomName.equals(map.getHallBwtnHallAndLounge().getMyRoom())) {
				return this.pnlHallToLounge;
			} else if (roomName.equals(map.getHallBwtnLibraryAndBillardRoom().getMyRoom())) {
				return this.pnlLibraryToBillardRoom;
			} else if (roomName.equals(map.getHallBwtnBillardRoomAndDiningRoom().getMyRoom())) {
				return this.pnlBillardRoomToDiningRoom;
			} else if (roomName.equals(map.getHallBwtnConservatoryAndBallroom().getMyRoom())) {
				return this.pnlConservatoryToBallRoom;
			} else if (roomName.equals(map.getHallBwtnStudyAndLibrary().getMyRoom())) {
				return this.pnlStudyToLibrary;
			} else if (roomName.equals(map.getHallBwtnLibraryAndConservatory().getMyRoom())) {
				return this.pnlLibraryToConservatory;
			} else if (roomName.equals(map.getHallBwtnHallAndBillardRoom().getMyRoom())) {
				return this.pnlHallToBillardRoom;
			} else if (roomName.equals(map.getHallBwtnBillardRoomAndBallroom().getMyRoom())) {
				return this.pnlBillardRoomToBallroom;
			} else if (roomName.equals(map.getHallBwtnLoungeAndDiningRoom().getMyRoom())) {
				return this.pnlLoungeToDiningRoom;
			} else if (roomName.equals(map.getHallBwtnDiningRoomAndKitchen().getMyRoom())) {
				return this.pnlDiningRoomToKitchen;
			} else if (roomName.equals(map.getHallBwtnBallroomAndKitchen().getMyRoom())) {
				return this.pnlBallRoomToKitchen;
			}
			
			return null;
		}
		
		public void run() {
			try {
				frmClueless.setVisible(true);
				frmClueless.validate();
				//processMessage("GUI starting");
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		
		void setNumPlayers(int numPlayers) {
			m_numPlayers = numPlayers;
		}
		
		void setCharacter(String character) {
			m_character = character;
		}
		
		//public void updateGUI() {
		//}
		
		/**
		 * print a message in the text area of the game board
		 * @param message
		 */
		public void processMessage(String message) {
			txtMessages.append("> " + message + "\n");
		}
		
		/**
		 * return the player's character choice
		 * @return
		 */
		/*public String getPreferredCharacter(String message) {
			String response = getResponseFromPlayer(message);
			//lblPlayerMarker.setIcon(new ImageIcon("C:\\Users\\Matthew\\Documents\\605.401\\HCI Presentation\\Clue-Less Pics\\mr_green.jpg"));
			//lblPlayerMarker.setSize(156,240);
			//lblPlayerMarker.repaint();
			
			
			lblPlayerMarker = new JLabel();
			lblPlayerMarker.setIcon(new ImageIcon("C:\\Users\\Matthew\\Documents\\605.401\\HCI Presentation\\Clue-Less Pics\\mr_green.jpg"));
			lblPlayerMarker.setSize(156,240);
			pnlPlayerMarker.add(lblPlayerMarker);
			
			frmClueless.validate();
			return response;
		}*/
		
		public String askPlayerQuestion(String message) {
			return getResponseFromPlayer(message);
		}
		
		/**
		 * return the player's preferred number of opponents
		 * @return
		 */
		public int getPreferredNumberOfPlayers(String message) {
			return Integer.parseInt(getResponseFromPlayer(message));
		}
		
		public String getResponseFromPlayer(String message){
			return JOptionPane.showInputDialog(message);
		}
		
		private ImageIcon getScaledImageIcon(ImageIcon imageIcon, int width, int height) {
			Image image = imageIcon.getImage(); 
			image = image.getScaledInstance(width, height, Image.SCALE_SMOOTH);
			imageIcon = new ImageIcon(image);
			return imageIcon;
		}
		
		private String getPlayerDropList(String message) {
			String response = (String) getDropList(message, getAllCharacters());

			//ImageIcon imageIcon = new ImageIcon(path + response.toLowerCase() + ".jpg");
			//Image image = imageIcon.getImage(); 
			//image = image.getScaledInstance(-1, pnlPlayerMarker.getHeight(), Image.SCALE_SMOOTH);
			//imageIcon = new ImageIcon(image);
			ImageIcon imageIcon = getScaledImageIcon(new ImageIcon(path + response.toLowerCase() + ".jpg"), -1, pnlPlayerMarker.getHeight());
			lblPlayerMarker = new JLabel();
			lblPlayerMarker.setSize(imageIcon.getIconWidth(),imageIcon.getIconHeight());
			lblPlayerMarker.setLocation((pnlPlayerMarker.getWidth() - imageIcon.getIconWidth()) / 2, 0);
			lblPlayerMarker.setIcon(imageIcon);
			
			pnlPlayerMarker.add(lblPlayerMarker);
			
			frmClueless.repaint();
			
			return response;
		}
		
		Object[] getAllCharacters() {
			Object[] allCharacters = {Character.m_COL_MUSTARD, Character.m_MISS_SCARLET, Character.m_MR_GREEN, 
					  Character.m_MRS_PEACOCK, Character.m_MRS_WHITE, Character.m_PROF_PLUM};
			
			return allCharacters;
		}
		
		Object[] getSuspectCharacters() {
			return m_suspectCharacters.toArray();
		}
		
		Object[] getAllWeapons() {
			Object[] allWeapons = {	Weapon.m_CANDLESTICK, Weapon.m_KNIFE, Weapon.m_LEAD_PIPE,
									Weapon.m_REVOLVER, Weapon.m_ROPE, Weapon.m_WRENCH};
			
			return allWeapons;
		}
		
		Object[] getSuspectWeapons() {
			return m_suspectWeapons.toArray();
		}
		
		Object[] getAllRooms() {
			Object[] allRooms = {	Room.m_BALLROOM, Room.m_BILLIARD_ROOM, Room.m_CONSERVATORY,
									Room.m_DINING_ROOM, Room.m_HALL, Room.m_KITCHEN,
									Room.m_LIBRARY, Room.m_LOUNGE, Room.m_STUDY};
			return allRooms;
		}
		
		Object[] getSuspectRooms() {
			return m_suspectRooms.toArray();
		}
		
		
		private String getDropList(String message, Object[] possibilities) {
			
			return (String) JOptionPane.showInputDialog(
			                    null, message,
			                    "Please choose ...",
			                    JOptionPane.PLAIN_MESSAGE,
			                    null, possibilities,
			                    possibilities[0]);
		}
		
		/**
		 * enable a valid player turn option
		 * @param buttonName
		 */
		public void enableButton(String buttonName) {
			switch (buttonName.toLowerCase()) {
			case "accuse":
				btnAccuse.setEnabled(true);
				break;
			case "secret":
				btnUseSecretPassage.setEnabled(true);
				break;
			//case "suggest":
			//	btnSuggest.setEnabled(true);
			//	break;
			case "up":
				btnUp.setEnabled(true);
				break;
			case "right":
				btnRight.setEnabled(true);
				break;
			case "left":
				btnLeft.setEnabled(true);
				break;
			case "down":
				btnDown.setEnabled(true);
				break;
			}
		}
		
		/*private String makeOneWordProperCase(String string){
			String result = "";
			result += string.substring(0, 1).toUpperCase();
			for(int k=  1; k <string.length();k++){
				result += string.substring(k, k+1).toLowerCase();	
			}
			return result;
		}*/
		
		private String capitalizeAllWords(String string){

			String[] substrings = string.split(" ");
			String result = "";
			for(int k = 0; k < substrings.length; k++) {
				String firstLetter = substrings[k].substring(0, 1).toUpperCase();
				String remainder   = substrings[k].substring(1, substrings[k].length());
				if (k != substrings.length - 1) result = result + firstLetter + remainder + " ";
				else result = result + firstLetter + remainder;
			}
			
			return result;
		}
		
		void updateRuledOutCards(String card) {
			if (Card.isCharacter(card.toLowerCase())) {
				m_ruledOutCharacters.add(new String(card));
				m_suspectCharacters.remove(capitalizeAllWords(card.toString()));
			}
			else if (Card.isWeapon(card.toLowerCase())) {;
				m_ruledOutWeapons.add(new String(card));
				m_suspectWeapons.remove(capitalizeAllWords(card.toString()));
			}
			else {
				m_ruledOutRooms.add(new String(card));
				m_suspectRooms.remove(capitalizeAllWords(card.toString()));
			}
			
			enableCards();
		}
		
		public void setStartingCards(ArrayList<StringPair> cardList) {
			for (int i = 0; i < cardList.size(); i++) {
				if (Card.isCharacter(cardList.get(i).getValue().toLowerCase())) {
					m_inHandCharacters  .add(new String(cardList.get(i).getValue()));
					//m_ruledOutCharacters.add(new String(cardList.get(i).getValue()));
				}
				else if (Card.isWeapon(cardList.get(i).getValue().toLowerCase())) {
					m_inHandWeapons  .add(new String(cardList.get(i).getValue()));
					//m_ruledOutWeapons.add(new String(cardList.get(i).getValue()));
				}
				else {
					m_inHandRooms  .add(new String(cardList.get(i).getValue()));
					//m_ruledOutRooms.add(new String(cardList.get(i).getValue()));
				}
				updateRuledOutCards(cardList.get(i).getValue());
				
				ImageIcon imageIcon = getScaledImageIcon(new ImageIcon(path + cardList.get(i).getValue().toLowerCase() + ".jpg"), -1, pnlPlayerCards.getHeight());
				JLabel label = new JLabel();
				label.setSize(imageIcon.getIconWidth(),imageIcon.getIconHeight());
				label.setLocation((pnlPlayerCards.getWidth()) / cardList.size() * (cardList.size() - i -1), 0);
				label.setIcon(imageIcon);
				
				pnlPlayerCards.add(label);
			}
			frmClueless.repaint();
		}
		
//		/**
//		 * parse the cards string and display
//		 * @param cards
//		 */
//		public void parseCards(String allCards){
//			String[] cards = allCards.split(",");
//
//			for(int i = 0;i<cards.length;i++){
//				
//				String[] cardName = cards[i].split(" ");	
//				String cardNameResult = makeOneWordProperCase(cardName[0]);
//				for(int j = 1;j<cardName.length;j++){
//					cardNameResult += " " + makeOneWordProperCase(cardName[j]);
//				}
//				cards[i] = cardNameResult;
//				
//
//				switch (cards[i]){
//					case Character.m_COL_MUSTARD:
//						txtColonelMustard.setText("X");
//						break;
//					case Character.m_MISS_SCARLET:
//						txtMissScarlet.setText("X");
//						break;
//					case Character.m_MR_GREEN:
//						txtMrGreen.setText("X");
//						break;
//					case Character.m_MRS_PEACOCK:
//						txtMrsPeacock.setText("X");
//						break;
//					case Character.m_MRS_WHITE:
//						txtMrsWhite.setText("X");
//						break;
//					case Character.m_PROF_PLUM:
//						txtProfessorPlum.setText("X");
//						break;
//					case Weapon.m_CANDLESTICK:
//						txtCandlestick.setText("X");
//						break;
//					case Weapon.m_KNIFE:
//						txtKnife.setText("X");
//						break;
//					case Weapon.m_LEAD_PIPE:
//						txtLeadPipe.setText("X");
//						break;
//					case Weapon.m_REVOLVER:
//						txtRevolver.setText("X");
//						break;
//					case Weapon.m_ROPE:
//						txtRope.setText("X");
//						break;
//					case Weapon.m_WRENCH:
//						txtWrench.setText("X");
//						break;
//					case Room.m_STUDY:
//						txtStudy.setText("X");
//						break;
//					case Room.m_HALL:
//						txtHall.setText("X");
//						break;
//					case Room.m_LOUNGE:
//						txtLounge.setText("X");
//						break;
//					case Room.m_LIBRARY:
//						txtLibrary.setText("X");
//						break;
//					case Room.m_BILLIARD_ROOM:
//						txtBilliardRoom.setText("X");
//						break;
//					case Room.m_DINING_ROOM:
//						txtDiningRoom.setText("X");
//						break;
//					case Room.m_CONSERVATORY:
//						txtConservatory.setText("X");
//						break;
//					case Room.m_BALLROOM:
//						txtBallroom.setText("X");
//						break;
//					case Room.m_KITCHEN:
//						txtKitchen.setText("X");
//						break;
//				}
//			}
//		}
//		
		/**
		 * parse the cards string and display
		 * @param cards
		 */
		private void enableCards() {
			ArrayList<String> allRuledOutCards = new ArrayList<String>();

			allRuledOutCards.addAll(this.m_ruledOutCharacters);
			allRuledOutCards.addAll(this.m_ruledOutWeapons);
			allRuledOutCards.addAll(this.m_ruledOutRooms);

			for(int i = 0; i<allRuledOutCards.size(); i++){
				
				String word = capitalizeAllWords(allRuledOutCards.get(i));
				switch (word){
					case Character.m_COL_MUSTARD:
						txtColonelMustard.setText("X");
						break;
					case Character.m_MISS_SCARLET:
						txtMissScarlet.setText("X");
						break;
					case Character.m_MR_GREEN:
						txtMrGreen.setText("X");
						break;
					case Character.m_MRS_PEACOCK:
						txtMrsPeacock.setText("X");
						break;
					case Character.m_MRS_WHITE:
						txtMrsWhite.setText("X");
						break;
					case Character.m_PROF_PLUM:
						txtProfessorPlum.setText("X");
						break;
					case Weapon.m_CANDLESTICK:
						txtCandlestick.setText("X");
						break;
					case Weapon.m_KNIFE:
						txtKnife.setText("X");
						break;
					case Weapon.m_LEAD_PIPE:
						txtLeadPipe.setText("X");
						break;
					case Weapon.m_REVOLVER:
						txtRevolver.setText("X");
						break;
					case Weapon.m_ROPE:
						txtRope.setText("X");
						break;
					case Weapon.m_WRENCH:
						txtWrench.setText("X");
						break;
					case Room.m_STUDY:
						txtStudy.setText("X");
						break;
					case Room.m_HALL:
						txtHall.setText("X");
						break;
					case Room.m_LOUNGE:
						txtLounge.setText("X");
						break;
					case Room.m_LIBRARY:
						txtLibrary.setText("X");
						break;
					case Room.m_BILLIARD_ROOM:
						txtBilliardRoom.setText("X");
						break;
					case Room.m_DINING_ROOM:
						txtDiningRoom.setText("X");
						break;
					case Room.m_CONSERVATORY:
						txtConservatory.setText("X");
						break;
					case Room.m_BALLROOM:
						txtBallroom.setText("X");
						break;
					case Room.m_KITCHEN:
						txtKitchen.setText("X");
						break;
				}
			}
		}

		public void setStartPositions(ArrayList<StringPair> message) {
			for (int i = 0; i < message.size()/2; i++) {
				m_playerCharacters.add(message.get(2*i    ).getValue());
				m_playerLocations .add(message.get(2*i  +1).getValue());
				if (m_playerCharacters.get(i).toLowerCase().equals(Character.m_COL_MUSTARD .toLowerCase())) m_playerColors.add(Color.YELLOW);
				if (m_playerCharacters.get(i).toLowerCase().equals(Character.m_MISS_SCARLET.toLowerCase())) m_playerColors.add(Color.RED);
				if (m_playerCharacters.get(i).toLowerCase().equals(Character.m_MR_GREEN    .toLowerCase())) m_playerColors.add(Color.GREEN);
				if (m_playerCharacters.get(i).toLowerCase().equals(Character.m_MRS_PEACOCK .toLowerCase())) m_playerColors.add(Color.BLUE);
				if (m_playerCharacters.get(i).toLowerCase().equals(Character.m_MRS_WHITE   .toLowerCase())) m_playerColors.add(Color.WHITE);
				if (m_playerCharacters.get(i).toLowerCase().equals(Character.m_PROF_PLUM   .toLowerCase())) m_playerColors.add(new Color(255, 0, 255));
				System.out.println(m_playerCharacters.get(i) + " starts in " + m_playerLocations.get(i));
			}
			
			this.clearAllRooms();
			for (int i = 0; i < m_playerCharacters.size(); i++) {
				this.getRoom(m_playerLocations.get(i)).setPlayer(m_playerCharacters.get(i));
			}
		}
		
		void updateCharacterLocation(String character, String room) {
			for (int i = 0; i < m_playerCharacters.size(); i++) {
				if (m_playerCharacters.get(i).equalsIgnoreCase(character)) {
					m_playerLocations.set(i, room);
					break;
				}
			}
			//update map here...
			this.clearAllRooms();
			for (int i = 0; i < m_playerCharacters.size(); i++) {
				this.getRoom(m_playerLocations.get(i)).setPlayer(m_playerCharacters.get(i));
			}
		}
		
		String getMyRoom() {
			for (int i = 0; i < m_playerCharacters.size(); i++) {
				if (m_playerCharacters.get(i).equals(m_character)) {
					return m_playerLocations.get(i);
				}
			}
			return null;
		}
		
		Object[] getPossibleCards(String character, String weapon, String room) {
			
			ArrayList<String> cards = new ArrayList<String>();
			
			if (this.m_inHandCharacters.contains(character.toLowerCase())) {
				cards.add(character);
			}
			if (this.m_inHandWeapons.contains(weapon.toLowerCase())) {
				cards.add(weapon);
			}
			if (this.m_inHandRooms.contains(room.toLowerCase())) {
				cards.add(room);
			}
			
			if (cards.size() == 0) {
				cards.add("None");
			}
			
			return cards.toArray();

		}

		public String getResponse() {
			String returnValue = response;
			response = "nothing";
			return returnValue;
		}

		/**
		 * Launch the application.
		 */
//		public static void main(String[] args) {
//			try {
//				new GUI();
//			}
//			catch (Exception ex) {
//				ex.printStackTrace();
//			}
//		}

		/**
		 * Create the application.
		 */
		public GUI() {
			m_inHandCharacters = new ArrayList<String>();
			m_inHandWeapons    = new ArrayList<String>();
			m_inHandRooms      = new ArrayList<String>();
			
			m_ruledOutCharacters = new ArrayList<String>();
			m_ruledOutWeapons    = new ArrayList<String>();
			m_ruledOutRooms      = new ArrayList<String>();

			m_playerCharacters = new ArrayList<String>();
			m_playerLocations  = new ArrayList<String>();
			m_playerColors     = new ArrayList<Color >();
			
			m_suspectCharacters = new ArrayList<String>();
			Object[] characters = getAllCharacters();
			for(Object character: characters){
				m_suspectCharacters.add((String)character);
			}
			m_suspectWeapons = new ArrayList<String>();
			Object[] weapons = getAllWeapons();
			for(Object weapon:weapons){
				m_suspectWeapons.add((String)weapon);
			}
			m_suspectRooms = new ArrayList<String>();
			Object[] rooms = getAllRooms();
			for(Object room:rooms){
				m_suspectRooms.add((String)room);
			}

			initialize();
			run();
		}

		/**
		 * Initialize the contents of the frame.
		 */
		private void initialize() {
			frmClueless = new JFrame();
			frmClueless.setTitle("Clue-Less");
			ImageIcon icon = getScaledImageIcon(new ImageIcon(path + "Omega.jpg"),-1,16);
			frmClueless.setIconImage(new ImageIcon(path + "Omega.jpg").getImage());
			frmClueless.setResizable(false);
			frmClueless.setBounds(100, 100, 800, 600);
			frmClueless.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			frmClueless.getContentPane().setLayout(null);
			
			pnlPlayerControlPanel = new JPanel();
			pnlPlayerControlPanel.setBounds(10, 422, 774, 139);
			frmClueless.getContentPane().add(pnlPlayerControlPanel);
			pnlPlayerControlPanel.setLayout(null);
			
			pnlPlayerMarker = new JPanel();
			//pnlPlayerMarker.setBorder(new LineBorder(new Color(0, 0, 0)));
			pnlPlayerMarker.setBounds(0, 0, 91, 139);
			pnlPlayerMarker.setLayout(null);
			pnlPlayerControlPanel.add(pnlPlayerMarker);
			
			
			pnlPlayerCards = new JPanel();
			//pnlPlayerCards.setBorder(new LineBorder(new Color(0, 0, 0)));
			pnlPlayerCards.setBounds(321, 0, 453, 139);
			pnlPlayerCards.setLayout(null);
			pnlPlayerControlPanel.add(pnlPlayerCards);
			
			JPanel pnlActions = new JPanel();
			pnlActions.setBounds(91, 0, 230, 139);
			pnlPlayerControlPanel.add(pnlActions);
			pnlActions.setLayout(null);
			
			ActionListener buttonListener = new ActionListener() {
				public synchronized void actionPerformed(ActionEvent arg0) {
					btnUp.setEnabled(false);
					btnDown.setEnabled(false);
					btnRight.setEnabled(false);
					btnLeft.setEnabled(false);
					btnUseSecretPassage.setEnabled(false);
					//btnSuggest.setEnabled(false);
					btnAccuse.setEnabled(false);
					
					if(arg0.getSource().equals(btnUp)){
						//processMessage(Move.m_UP);
						m_response = "up";
					}else if(arg0.getSource().equals(btnDown)){
						//processMessage(Move.m_DOWN);
						m_response = "down";
					}else if(arg0.getSource().equals(btnRight)){
						//processMessage(Move.m_RIGHT);
						//System.out.println("going to move right");
						m_response = "right";
					}else if(arg0.getSource().equals(btnLeft)){
						//processMessage(Move.m_LEFT);
						m_response = "left";
					//}else if(arg0.getSource().equals(btnSuggest)){
					//	processMessage("Suggest");
					//	m_response = "suggest";
					}else if(arg0.getSource().equals(btnAccuse)){
						//processMessage("Accuse");
						m_response = "accuse";
					}else if(arg0.getSource().equals(btnUseSecretPassage)){
						//processMessage("Use Secret Passage");
						m_response = "secret";
					}
					
					//notifyAll();
				}
			};
			
//			btnSuggest = new Button("Suggest");
//			btnSuggest.setEnabled(false);
//			btnSuggest.addActionListener(buttonListener);
//			btnSuggest.setBounds(161, 51, 70, 22);
//			pnlActions.add(btnSuggest);
			
			
			btnUp = new JButton(getScaledImageIcon(new ImageIcon(path + "arrow_up.png"), 22, 22));
			btnUp.setEnabled(false);
			btnUp.addActionListener(buttonListener);
			btnUp.setBounds(32, 36, 22, 22);
			pnlActions.add(btnUp);
			
			btnLeft = new JButton(getScaledImageIcon(new ImageIcon(path + "arrow_right.png"), 22, 22));
			btnLeft.setEnabled(false);
			btnLeft.addActionListener(buttonListener);
			btnLeft.setBounds(10, 58, 22, 22);
			pnlActions.add(btnLeft);
			
			btnDown = new JButton(getScaledImageIcon(new ImageIcon(path + "arrow_down.png"), 22, 22));
			btnDown.setEnabled(false);
			btnDown.addActionListener(buttonListener);
			btnDown.setBounds(32, 80, 22, 22);
			pnlActions.add(btnDown);

			btnRight = new JButton(getScaledImageIcon(new ImageIcon(path + "arrow_left.png"), 22, 22));
			btnRight.setEnabled(false);
			btnRight.addActionListener(buttonListener);
			btnRight.setBounds(54, 58, 22, 22);
			pnlActions.add(btnRight);
			
			btnAccuse = new JButton("Accuse");
			btnAccuse.setEnabled(false);
			btnAccuse.addActionListener(buttonListener);
			//btnAccuse.setBounds(237, 51, 70, 22);
			btnAccuse.setBounds(80, 73, 140, 22);
			pnlActions.add(btnAccuse);
			
			btnUseSecretPassage = new JButton("Use Secret Passage");
			btnUseSecretPassage.setEnabled(false);
			btnUseSecretPassage.addActionListener(buttonListener);
			btnUseSecretPassage.setBounds(80, 41, 140, 22);
			pnlActions.add(btnUseSecretPassage);
			
			txtMessages = new JTextArea();
			txtMessages.setWrapStyleWord(true);
			txtMessages.setLineWrap(true);
			txtMessages.setEditable(false);
			DefaultCaret caret = (DefaultCaret)txtMessages.getCaret();
			caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);
			//txtMessages.setBounds(632, 11, 152, 400);

			txtMsgScroller = new JScrollPane(txtMessages);
			txtMsgScroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
			txtMsgScroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
			txtMsgScroller.setBounds(632, 11, 152, 400);
			
			frmClueless.getContentPane().add(txtMsgScroller);
			
			JPanel pnlGameBoard = new JPanel();
			pnlGameBoard.setBounds(222, 11, 400, 400);
			frmClueless.getContentPane().add(pnlGameBoard);
pnlGameBoard.setLayout(new GridLayout(5,5));
			
			pnlGameBoard.add(this.pnlStudy);
			pnlAllRooms.add(pnlStudy);
			pnlGameBoard.add(this.pnlStudyToHall);
			pnlAllRooms.add(pnlStudyToHall);
			pnlGameBoard.add(this.pnlHall);
			pnlAllRooms.add(pnlHall);
			pnlGameBoard.add(this.pnlHallToLounge);
			pnlAllRooms.add(pnlHallToLounge);
			pnlGameBoard.add(this.pnlLounge);
			pnlAllRooms.add(pnlLounge);
			
			pnlGameBoard.add(this.pnlStudyToLibrary);
			pnlAllRooms.add(pnlStudyToLibrary);
			pnlGameBoard.add(new JPanel());
			pnlGameBoard.add(this.pnlHallToBillardRoom);
			pnlAllRooms.add(pnlHallToBillardRoom);
			pnlGameBoard.add(new JPanel());
			pnlGameBoard.add(this.pnlLoungeToDiningRoom);
			pnlAllRooms.add(pnlLoungeToDiningRoom);
			
			pnlGameBoard.add(this.pnlLibrary);
			pnlAllRooms.add(pnlLibrary);
			pnlGameBoard.add(this.pnlLibraryToBillardRoom);
			pnlAllRooms.add(pnlLibraryToBillardRoom);
			pnlGameBoard.add(this.pnlBillardRoom);
			pnlAllRooms.add(pnlBillardRoom);
			pnlGameBoard.add(this.pnlBillardRoomToDiningRoom);
			pnlAllRooms.add(pnlBillardRoomToDiningRoom);
			pnlGameBoard.add(this.pnlDiningRoom);
			pnlAllRooms.add(pnlDiningRoom);
			
			pnlGameBoard.add(this.pnlLibraryToConservatory);
			pnlAllRooms.add(pnlLibraryToConservatory);
			pnlGameBoard.add(new JPanel());
			pnlGameBoard.add(this.pnlBillardRoomToBallroom);
			pnlAllRooms.add(pnlBillardRoomToBallroom);
			pnlGameBoard.add(new JPanel());
			pnlGameBoard.add(this.pnlDiningRoomToKitchen);
			pnlAllRooms.add(pnlDiningRoomToKitchen);
			
			pnlGameBoard.add(this.pnlConservatory);
			pnlAllRooms.add(pnlConservatory);
			pnlGameBoard.add(this.pnlConservatoryToBallRoom);
			pnlAllRooms.add(pnlConservatoryToBallRoom);
			pnlGameBoard.add(this.pnlBallRoom);
			pnlAllRooms.add(pnlBallRoom);
			pnlGameBoard.add(this.pnlBallRoomToKitchen);
			pnlAllRooms.add(pnlBallRoomToKitchen);
			pnlGameBoard.add(this.pnlKitchen);
			pnlAllRooms.add(pnlKitchen);
			
			JPanel pnlGameInfo = new JPanel();
			pnlGameInfo.setBounds(10, 11, 202, 400);
			frmClueless.getContentPane().add(pnlGameInfo);
			pnlGameInfo.setLayout(null);
			
			txtColonelMustard = new JTextField();
			txtColonelMustard.setEditable(false);
			txtColonelMustard.setBounds(0, 21, 17, 17);
			pnlGameInfo.add(txtColonelMustard);
			txtColonelMustard.setColumns(10);
			
			JLabel lblColonelMustard = new JLabel("Colonel Mustard");
			lblColonelMustard.setBounds(27, 22, 175, 17);
			pnlGameInfo.add(lblColonelMustard);
			
			txtMissScarlet = new JTextField();
			txtMissScarlet.setEditable(false);
			txtMissScarlet.setColumns(10);
			txtMissScarlet.setBounds(0, 38, 17, 17);
			pnlGameInfo.add(txtMissScarlet);
			
			JLabel lblMissScarlet = new JLabel("Miss Scarlet");
			lblMissScarlet.setBounds(27, 38, 175, 17);
			pnlGameInfo.add(lblMissScarlet);
			
			txtProfessorPlum = new JTextField();
			txtProfessorPlum.setEditable(false);
			txtProfessorPlum.setColumns(10);
			txtProfessorPlum.setBounds(0, 55, 17, 17);
			pnlGameInfo.add(txtProfessorPlum);
			
			JLabel lblProfessorPlum = new JLabel("Professor Plum");
			lblProfessorPlum.setBounds(27, 55, 175, 17);
			pnlGameInfo.add(lblProfessorPlum);
			
			txtMrGreen = new JTextField();
			txtMrGreen.setEditable(false);
			txtMrGreen.setColumns(10);
			txtMrGreen.setBounds(0, 72, 17, 17);
			pnlGameInfo.add(txtMrGreen);
			
			JLabel lblMrGreen = new JLabel("Mr. Green");
			lblMrGreen.setBounds(27, 72, 175, 17);
			pnlGameInfo.add(lblMrGreen);
			
			txtMrsWhite = new JTextField();
			txtMrsWhite.setEditable(false);
			txtMrsWhite.setColumns(10);
			txtMrsWhite.setBounds(0, 89, 17, 17);
			pnlGameInfo.add(txtMrsWhite);
			
			JLabel lblMrsWhite = new JLabel("Mrs. White");
			lblMrsWhite.setBounds(27, 89, 175, 17);
			pnlGameInfo.add(lblMrsWhite);
			
			txtMrsPeacock = new JTextField();
			txtMrsPeacock.setEditable(false);
			txtMrsPeacock.setColumns(10);
			txtMrsPeacock.setBounds(0, 106, 17, 17);
			pnlGameInfo.add(txtMrsPeacock);
			
			JLabel lblMrsPeacock = new JLabel("Mrs. Peacock");
			lblMrsPeacock.setBounds(27, 106, 175, 17);
			pnlGameInfo.add(lblMrsPeacock);
			
			JLabel lblSuspects = new JLabel("Suspects");
			lblSuspects.setBounds(10, 0, 192, 17);
			pnlGameInfo.add(lblSuspects);
			
			JLabel lblWeapons = new JLabel("Weapons");
			lblWeapons.setBounds(10, 134, 192, 17);
			pnlGameInfo.add(lblWeapons);
			
			txtCandlestick = new JTextField();
			txtCandlestick.setEditable(false);
			txtCandlestick.setColumns(10);
			txtCandlestick.setBounds(0, 155, 17, 17);
			pnlGameInfo.add(txtCandlestick);
			
			txtKnife = new JTextField();
			txtKnife.setEditable(false);
			txtKnife.setColumns(10);
			txtKnife.setBounds(0, 172, 17, 17);
			pnlGameInfo.add(txtKnife);
			
			txtLeadPipe = new JTextField();
			txtLeadPipe.setEditable(false);
			txtLeadPipe.setColumns(10);
			txtLeadPipe.setBounds(0, 189, 17, 17);
			pnlGameInfo.add(txtLeadPipe);
			
			txtRevolver = new JTextField();
			txtRevolver.setEditable(false);
			txtRevolver.setColumns(10);
			txtRevolver.setBounds(0, 206, 17, 17);
			pnlGameInfo.add(txtRevolver);
			
			txtRope = new JTextField();
			txtRope.setEditable(false);
			txtRope.setColumns(10);
			txtRope.setBounds(0, 223, 17, 17);
			pnlGameInfo.add(txtRope);
			
			txtWrench = new JTextField();
			txtWrench.setEditable(false);
			txtWrench.setColumns(10);
			txtWrench.setBounds(0, 240, 17, 17);
			pnlGameInfo.add(txtWrench);
			
			JLabel lblWrench = new JLabel("Wrench");
			lblWrench.setBounds(27, 240, 175, 17);
			pnlGameInfo.add(lblWrench);
			
			JLabel lblRope = new JLabel("Rope");
			lblRope.setBounds(27, 223, 175, 17);
			pnlGameInfo.add(lblRope);
			
			JLabel lblRevolver = new JLabel("Revolver");
			lblRevolver.setBounds(27, 206, 175, 17);
			pnlGameInfo.add(lblRevolver);
			
			JLabel lblLeadPipe = new JLabel("Lead Pipe");
			lblLeadPipe.setBounds(27, 189, 175, 17);
			pnlGameInfo.add(lblLeadPipe);
			
			JLabel lblCandlestick = new JLabel("Candlestick");
			lblCandlestick.setBounds(27, 156, 175, 17);
			pnlGameInfo.add(lblCandlestick);
			
			JLabel lblKnife = new JLabel("Knife");
			lblKnife.setBounds(27, 172, 175, 17);
			pnlGameInfo.add(lblKnife);
			
			JLabel lblRooms = new JLabel("Rooms");
			lblRooms.setBounds(10, 268, 192, 17);
			pnlGameInfo.add(lblRooms);
			
			txtBallroom = new JTextField();
			txtBallroom.setEditable(false);
			txtBallroom.setColumns(10);
			txtBallroom.setBounds(0, 289, 17, 17);
			pnlGameInfo.add(txtBallroom);
			
			txtBilliardRoom = new JTextField();
			txtBilliardRoom.setEditable(false);
			txtBilliardRoom.setColumns(10);
			txtBilliardRoom.setBounds(0, 306, 17, 17);
			pnlGameInfo.add(txtBilliardRoom);
			
			txtConservatory = new JTextField();
			txtConservatory.setEditable(false);
			txtConservatory.setColumns(10);
			txtConservatory.setBounds(0, 323, 17, 17);
			pnlGameInfo.add(txtConservatory);
			
			txtDiningRoom = new JTextField();
			txtDiningRoom.setEditable(false);
			txtDiningRoom.setColumns(10);
			txtDiningRoom.setBounds(0, 340, 17, 17);
			pnlGameInfo.add(txtDiningRoom);
			
			txtHall = new JTextField();
			txtHall.setEditable(false);
			txtHall.setColumns(10);
			txtHall.setBounds(0, 357, 17, 17);
			pnlGameInfo.add(txtHall);
			
			txtKitchen = new JTextField();
			txtKitchen.setEditable(false);
			txtKitchen.setColumns(10);
			txtKitchen.setBounds(110, 289, 17, 17);
			pnlGameInfo.add(txtKitchen);
			
			JLabel lblKitchen = new JLabel("Kitchen");
			lblKitchen.setBounds(137, 289, 65, 17);
			pnlGameInfo.add(lblKitchen);
			
			JLabel lblHall = new JLabel("Hall");
			lblHall.setBounds(27, 357, 22, 17);
			pnlGameInfo.add(lblHall);
			
			JLabel lblDiningRoom = new JLabel("Dining Room");
			lblDiningRoom.setBounds(27, 340, 65, 17);
			pnlGameInfo.add(lblDiningRoom);
			
			JLabel lblConservatory = new JLabel("Conservatory");
			lblConservatory.setBounds(27, 323, 72, 17);
			pnlGameInfo.add(lblConservatory);
			
			JLabel lblBallroom = new JLabel("Ballroom");
			lblBallroom.setLabelFor(txtBallroom);
			lblBallroom.setBounds(27, 290, 47, 17);
			pnlGameInfo.add(lblBallroom);
			
			JLabel lblBilliardRoom = new JLabel("Billiard Room");
			lblBilliardRoom.setBounds(27, 306, 65, 17);
			pnlGameInfo.add(lblBilliardRoom);
			
			txtLibrary = new JTextField();
			txtLibrary.setEditable(false);
			txtLibrary.setColumns(10);
			txtLibrary.setBounds(110, 306, 17, 17);
			pnlGameInfo.add(txtLibrary);
			
			JLabel lblLibrary = new JLabel("Library");
			lblLibrary.setBounds(137, 306, 65, 17);
			pnlGameInfo.add(lblLibrary);
			
			txtLounge = new JTextField();
			txtLounge.setEditable(false);
			txtLounge.setColumns(10);
			txtLounge.setBounds(110, 323, 17, 17);
			pnlGameInfo.add(txtLounge);
			
			JLabel lblLounge = new JLabel("Lounge");
			lblLounge.setBounds(137, 323, 65, 17);
			pnlGameInfo.add(lblLounge);
			
			txtStudy = new JTextField();
			txtStudy.setEditable(false);
			txtStudy.setColumns(10);
			txtStudy.setBounds(110, 340, 17, 17);
			pnlGameInfo.add(txtStudy);
			
			JLabel lblStudy = new JLabel("Study");
			lblStudy.setBounds(137, 340, 65, 17);
			pnlGameInfo.add(lblStudy);
		}
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
//	////////////
//	// GUI class
//	////////////
//	public class GUI { // implements Runnable {
//
//		private JFrame frmClueless;
//		private JTextField txtColonelMustard;
//		private JTextField txtMissScarlet;
//		private JTextField txtProfessorPlum;
//		private JTextField txtMrGreen;
//		private JTextField txtMrsWhite;
//		private JTextField txtMrsPeacock;
//		private JTextField txtCandlestick;
//		private JTextField txtKnife;
//		private JTextField txtLeadPipe;
//		private JTextField txtRevolver;
//		private JTextField txtRope;
//		private JTextField txtWrench;
//		private JTextField txtBallroom;
//		private JTextField txtBilliardRoom;
//		private JTextField txtConservatory;
//		private JTextField txtDiningRoom;
//		private JTextField txtHall;
//		private JTextField txtKitchen;
//		private JTextField txtLibrary;
//		private JTextField txtLounge;
//		private JTextField txtStudy;
//		private JTextArea txtMessages;
//		private Button btnUp;
//		private Button btnRight;
//		private Button btnLeft;
//		private Button btnDown;
//		private Button btnUseSecretPassage;
//		private Button btnSuggest;
//		private Button btnAccuse;
//		
//		private String response = "nothing";
//		
//		public void run() {
//			try {
//				frmClueless.setVisible(true);
//				processMessage("GUI starting");
//			} catch (Exception e) {
//				e.printStackTrace();
//			}
//		}
//		
//		public void updateGUI() {
//		}
//		
//		/**
//		 * print a message in the text area of the game board
//		 * @param message
//		 */
//		public void processMessage(String message) {
//			txtMessages.append("> " + message + "\n");
//		}
//		
//		/**
//		 * return the player's character choice
//		 * @return
//		 */
//		public String getPreferredCharacter(String message) {
//			return JOptionPane.showInputDialog(message);
//		}
//		
//		/**
//		 * return the player's preferred number of opponents
//		 * @return
//		 */
//		public int getPreferredNumberOfPlayers(String message) {
//			return Integer.parseInt(JOptionPane.showInputDialog(message));
//		}
//		
//		public void enableButton(String buttonName) {
//			switch (buttonName) {
//			case "accuse":
//				btnAccuse.setEnabled(true);
//				break;
//			case "usesecretpassage":
//				btnUseSecretPassage.setEnabled(true);
//				break;
//			case "suggest":
//				btnSuggest.setEnabled(true);
//				break;
//			case "Up":
//				btnUp.setEnabled(true);
//				break;
//			case "Right":
//				btnRight.setEnabled(true);
//				break;
//			case "Left":
//				btnLeft.setEnabled(true);
//				break;
//			case "Down":
//				btnDown.setEnabled(true);
//				break;
//			}
//		}
//		
//		public String getResponse() {
//			String returnValue = response;
//			response = "nothing";
//			return returnValue;
//		}
//
//		/**
//		 * Launch the application.
//		 */
////		public static void main(String[] args) {
////			try {
////				new GUI();
////			}
////			catch (Exception ex) {
////				ex.printStackTrace();
////			}
////		}
//
//		/**
//		 * Create the application.
//		 */
//		public GUI() {
//			initialize();
//			run();
//		}
//
//		/**
//		 * Initialize the contents of the frame.
//		 */
//		private void initialize() {
//			frmClueless = new JFrame();
//			frmClueless.setTitle("Clue-Less");
//			frmClueless.setResizable(false);
//			frmClueless.setBounds(100, 100, 800, 600);
//			frmClueless.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//			frmClueless.getContentPane().setLayout(null);
//			
//			JPanel pnlPlayerControlPanel = new JPanel();
//			pnlPlayerControlPanel.setBounds(10, 422, 774, 139);
//			frmClueless.getContentPane().add(pnlPlayerControlPanel);
//			pnlPlayerControlPanel.setLayout(null);
//			
//			JPanel pnlPlayerMarker = new JPanel();
//			pnlPlayerMarker.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlPlayerMarker.setBounds(10, 11, 92, 117);
//			pnlPlayerControlPanel.add(pnlPlayerMarker);
//			
//			JPanel pnlPlayerCards = new JPanel();
//			pnlPlayerCards.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlPlayerCards.setBounds(488, 11, 276, 117);
//			pnlPlayerControlPanel.add(pnlPlayerCards);
//			
//			JPanel pnlActions = new JPanel();
//			pnlActions.setBounds(112, 11, 366, 117);
//			pnlPlayerControlPanel.add(pnlActions);
//			pnlActions.setLayout(null);
//			
//			ActionListener buttonListener = new ActionListener() {
//				public void actionPerformed(ActionEvent arg0) {
//					if(arg0.getSource().equals(btnUp)){
//						processMessage(Move.m_UP);
//						//response = "up";
//						m_response = "up";
//					}else if(arg0.getSource().equals(btnDown)){
//						processMessage(Move.m_DOWN);
//						//response = "down";
//						m_response = "down";
//					}else if(arg0.getSource().equals(btnRight)){
//						processMessage(Move.m_RIGHT);
//						//response = "right";
//						m_response = "right";
//					}else if(arg0.getSource().equals(btnLeft)){
//						processMessage(Move.m_LEFT);
//						//response = "left";
//						m_response = "left";
//					}else if(arg0.getSource().equals(btnSuggest)){
//						processMessage("Suggest");
//						response = "suggest";
//					}else if(arg0.getSource().equals(btnAccuse)){
//						processMessage("Accuse");
//						response = "accuse";
//					}else if(arg0.getSource().equals(btnUseSecretPassage)){
//						processMessage("Use Secret Passage");
//						response = "usesecretpassage";
//					}
//					
//					btnUp.setEnabled(false);
//					btnDown.setEnabled(false);
//					btnRight.setEnabled(false);
//					btnLeft.setEnabled(false);
//					btnSuggest.setEnabled(false);
//					btnAccuse.setEnabled(false);
//					btnUseSecretPassage.setEnabled(false);
//					
//					synchronized(this){
//						this.notify();
//					}
//				}
//			};
//			
//			btnSuggest = new Button("Suggest");
//			btnSuggest.setEnabled(false);
//			btnSuggest.addActionListener(buttonListener);
//			btnSuggest.setBounds(161, 51, 70, 22);
//			pnlActions.add(btnSuggest);
//			
//			btnUp = new Button(Move.m_UP);
//			btnUp.setEnabled(false);
//			btnUp.addActionListener(buttonListener);
//			btnUp.setBounds(37, 10, 22, 22);
//			pnlActions.add(btnUp);
//			
//			btnLeft = new Button(Move.m_LEFT);
//			btnLeft.setEnabled(false);
//			btnLeft.addActionListener(buttonListener);
//			btnLeft.setBounds(10, 38, 22, 22);
//			pnlActions.add(btnLeft);
//			
//			btnDown = new Button(Move.m_DOWN);
//			btnDown.setEnabled(false);
//			btnDown.addActionListener(buttonListener);
//			btnDown.setBounds(37, 66, 22, 22);
//			pnlActions.add(btnDown);
//
//			btnRight = new Button(Move.m_RIGHT);
//			btnRight.setEnabled(false);
//			btnRight.addActionListener(buttonListener);
//			btnRight.setBounds(64, 38, 22, 22);
//			pnlActions.add(btnRight);
//			
//			btnAccuse = new Button("Accuse");
//			btnAccuse.setEnabled(false);
//			btnAccuse.addActionListener(buttonListener);
//			btnAccuse.setBounds(237, 51, 70, 22);
//			pnlActions.add(btnAccuse);
//			
//			btnUseSecretPassage = new Button("Use Secret Passage");
//			btnUseSecretPassage.setEnabled(false);
//			btnUseSecretPassage.addActionListener(buttonListener);
//			btnUseSecretPassage.setBounds(161, 23, 146, 22);
//			pnlActions.add(btnUseSecretPassage);
//			
//			txtMessages = new JTextArea();
//			txtMessages.setEditable(false);
//			txtMessages.setBounds(632, 11, 152, 400);
//			frmClueless.getContentPane().add(txtMessages);
//			
//			JPanel pnlGameBoard = new JPanel();
//			pnlGameBoard.setBounds(222, 11, 400, 400);
//			frmClueless.getContentPane().add(pnlGameBoard);
//			pnlGameBoard.setLayout(null);
//			
//			JPanel pnlStudy = new JPanel();
//			pnlStudy.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlStudy.setBounds(0, 0, 100, 100);
//			pnlGameBoard.add(pnlStudy);
//			pnlStudy.setLayout(null);
//			
//			JPanel pnlST_KI = new JPanel();
//			pnlST_KI.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlST_KI.setBounds(75, 75, 25, 25);
//			pnlStudy.add(pnlST_KI);
//			
//			JLabel label = new JLabel("Study");
//			label.setBounds(10, 11, 80, 17);
//			pnlStudy.add(label);
//			
//			JPanel pnlHall = new JPanel();
//			pnlHall.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlHall.setBounds(150, 0, 100, 100);
//			pnlGameBoard.add(pnlHall);
//			pnlHall.setLayout(null);
//			
//			JLabel label_1 = new JLabel("Hall");
//			label_1.setBounds(10, 11, 80, 14);
//			pnlHall.add(label_1);
//			
//			JPanel pnlLounge = new JPanel();
//			pnlLounge.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlLounge.setBounds(300, 0, 100, 100);
//			pnlGameBoard.add(pnlLounge);
//			pnlLounge.setLayout(null);
//			
//			JPanel pnlLO_CO = new JPanel();
//			pnlLO_CO.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlLO_CO.setBounds(0, 75, 25, 25);
//			pnlLounge.add(pnlLO_CO);
//			
//			JLabel label_2 = new JLabel("Lounge");
//			label_2.setBounds(10, 11, 65, 17);
//			pnlLounge.add(label_2);
//			
//			JPanel pnlLibrary = new JPanel();
//			pnlLibrary.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlLibrary.setBounds(0, 150, 100, 100);
//			pnlGameBoard.add(pnlLibrary);
//			pnlLibrary.setLayout(null);
//			
//			JLabel label_3 = new JLabel("Library");
//			label_3.setBounds(10, 11, 80, 17);
//			pnlLibrary.add(label_3);
//			
//			JPanel pnlBilliardRoom = new JPanel();
//			pnlBilliardRoom.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlBilliardRoom.setBounds(150, 150, 100, 100);
//			pnlGameBoard.add(pnlBilliardRoom);
//			pnlBilliardRoom.setLayout(null);
//			
//			JLabel label_5 = new JLabel("Billiard Room");
//			label_5.setBounds(10, 11, 80, 17);
//			pnlBilliardRoom.add(label_5);
//			
//			JPanel pnlDiningRoom = new JPanel();
//			pnlDiningRoom.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlDiningRoom.setBounds(300, 150, 100, 100);
//			pnlGameBoard.add(pnlDiningRoom);
//			pnlDiningRoom.setLayout(null);
//			
//			JLabel label_6 = new JLabel("Dining Room");
//			label_6.setBounds(10, 11, 80, 17);
//			pnlDiningRoom.add(label_6);
//			
//			JPanel pnlConservatory = new JPanel();
//			pnlConservatory.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlConservatory.setBounds(0, 300, 100, 100);
//			pnlGameBoard.add(pnlConservatory);
//			pnlConservatory.setLayout(null);
//			
//			JPanel pnlCO_LO = new JPanel();
//			pnlCO_LO.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlCO_LO.setBounds(75, 0, 25, 25);
//			pnlConservatory.add(pnlCO_LO);
//			
//			JLabel label_4 = new JLabel("Conservatory");
//			label_4.setBounds(10, 11, 80, 17);
//			pnlConservatory.add(label_4);
//			
//			JPanel pnlBallroom = new JPanel();
//			pnlBallroom.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlBallroom.setBounds(150, 300, 100, 100);
//			pnlGameBoard.add(pnlBallroom);
//			pnlBallroom.setLayout(null);
//			
//			JLabel label_7 = new JLabel("Ballroom");
//			label_7.setBounds(10, 11, 80, 17);
//			pnlBallroom.add(label_7);
//			
//			JPanel pnlKitchen = new JPanel();
//			pnlKitchen.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlKitchen.setBounds(300, 300, 100, 100);
//			pnlGameBoard.add(pnlKitchen);
//			pnlKitchen.setLayout(null);
//			
//			JPanel pnlKI_ST = new JPanel();
//			pnlKI_ST.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlKI_ST.setBounds(0, 0, 25, 25);
//			pnlKitchen.add(pnlKI_ST);
//			
//			JLabel label_8 = new JLabel("Kitchen");
//			label_8.setBounds(10, 11, 80, 17);
//			pnlKitchen.add(label_8);
//			
//			JPanel pnlST_HA = new JPanel();
//			pnlST_HA.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlST_HA.setBounds(100, 25, 50, 50);
//			pnlGameBoard.add(pnlST_HA);
//			
//			JPanel pnlHA_LO = new JPanel();
//			pnlHA_LO.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlHA_LO.setBounds(250, 25, 50, 50);
//			pnlGameBoard.add(pnlHA_LO);
//			
//			JPanel pnlLI_BI = new JPanel();
//			pnlLI_BI.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlLI_BI.setBounds(100, 175, 50, 50);
//			pnlGameBoard.add(pnlLI_BI);
//			
//			JPanel pnlBI_DI = new JPanel();
//			pnlBI_DI.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlBI_DI.setBounds(250, 175, 50, 50);
//			pnlGameBoard.add(pnlBI_DI);
//			
//			JPanel pnlCO_BA = new JPanel();
//			pnlCO_BA.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlCO_BA.setBounds(100, 325, 50, 50);
//			pnlGameBoard.add(pnlCO_BA);
//			
//			JPanel pnlBA_KI = new JPanel();
//			pnlBA_KI.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlBA_KI.setBounds(250, 325, 50, 50);
//			pnlGameBoard.add(pnlBA_KI);
//			
//			JPanel pnlLI_CO = new JPanel();
//			pnlLI_CO.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlLI_CO.setBounds(25, 250, 50, 50);
//			pnlGameBoard.add(pnlLI_CO);
//			
//			JPanel pnlST_LI = new JPanel();
//			pnlST_LI.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlST_LI.setBounds(25, 100, 50, 50);
//			pnlGameBoard.add(pnlST_LI);
//			
//			JPanel pnlHA_BI = new JPanel();
//			pnlHA_BI.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlHA_BI.setBounds(175, 100, 50, 50);
//			pnlGameBoard.add(pnlHA_BI);
//			
//			JPanel pnlBI_BA = new JPanel();
//			pnlBI_BA.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlBI_BA.setBounds(175, 250, 50, 50);
//			pnlGameBoard.add(pnlBI_BA);
//			
//			JPanel pnlLO_DI = new JPanel();
//			pnlLO_DI.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlLO_DI.setBounds(325, 100, 50, 50);
//			pnlGameBoard.add(pnlLO_DI);
//			
//			JPanel pnlDI_KI = new JPanel();
//			pnlDI_KI.setBorder(new LineBorder(new Color(0, 0, 0)));
//			pnlDI_KI.setBounds(325, 250, 50, 50);
//			pnlGameBoard.add(pnlDI_KI);
//			
//			JPanel pnlGameInfo = new JPanel();
//			pnlGameInfo.setBounds(10, 11, 202, 400);
//			frmClueless.getContentPane().add(pnlGameInfo);
//			pnlGameInfo.setLayout(null);
//			
//			txtColonelMustard = new JTextField();
//			txtColonelMustard.setEditable(false);
//			txtColonelMustard.setBounds(0, 21, 17, 17);
//			pnlGameInfo.add(txtColonelMustard);
//			txtColonelMustard.setColumns(10);
//			
//			JLabel lblColonelMustard = new JLabel("Colonel Mustard");
//			lblColonelMustard.setBounds(27, 22, 175, 17);
//			pnlGameInfo.add(lblColonelMustard);
//			
//			txtMissScarlet = new JTextField();
//			txtMissScarlet.setEditable(false);
//			txtMissScarlet.setColumns(10);
//			txtMissScarlet.setBounds(0, 38, 17, 17);
//			pnlGameInfo.add(txtMissScarlet);
//			
//			JLabel lblMissScarlet = new JLabel("Miss Scarlet");
//			lblMissScarlet.setBounds(27, 38, 175, 17);
//			pnlGameInfo.add(lblMissScarlet);
//			
//			txtProfessorPlum = new JTextField();
//			txtProfessorPlum.setEditable(false);
//			txtProfessorPlum.setColumns(10);
//			txtProfessorPlum.setBounds(0, 55, 17, 17);
//			pnlGameInfo.add(txtProfessorPlum);
//			
//			JLabel lblProfessorPlum = new JLabel("Professor Plum");
//			lblProfessorPlum.setBounds(27, 55, 175, 17);
//			pnlGameInfo.add(lblProfessorPlum);
//			
//			txtMrGreen = new JTextField();
//			txtMrGreen.setEditable(false);
//			txtMrGreen.setColumns(10);
//			txtMrGreen.setBounds(0, 72, 17, 17);
//			pnlGameInfo.add(txtMrGreen);
//			
//			JLabel lblMrGreen = new JLabel("Mr. Green");
//			lblMrGreen.setBounds(27, 72, 175, 17);
//			pnlGameInfo.add(lblMrGreen);
//			
//			txtMrsWhite = new JTextField();
//			txtMrsWhite.setEditable(false);
//			txtMrsWhite.setColumns(10);
//			txtMrsWhite.setBounds(0, 89, 17, 17);
//			pnlGameInfo.add(txtMrsWhite);
//			
//			JLabel lblMrsWhite = new JLabel("Mrs. White");
//			lblMrsWhite.setBounds(27, 89, 175, 17);
//			pnlGameInfo.add(lblMrsWhite);
//			
//			txtMrsPeacock = new JTextField();
//			txtMrsPeacock.setEditable(false);
//			txtMrsPeacock.setColumns(10);
//			txtMrsPeacock.setBounds(0, 106, 17, 17);
//			pnlGameInfo.add(txtMrsPeacock);
//			
//			JLabel lblMrsPeacock = new JLabel("Mrs. Peacock");
//			lblMrsPeacock.setBounds(27, 106, 175, 17);
//			pnlGameInfo.add(lblMrsPeacock);
//			
//			JLabel lblSuspects = new JLabel("Suspects");
//			lblSuspects.setBounds(10, 0, 192, 17);
//			pnlGameInfo.add(lblSuspects);
//			
//			JLabel lblWeapons = new JLabel("Weapons");
//			lblWeapons.setBounds(10, 134, 192, 17);
//			pnlGameInfo.add(lblWeapons);
//			
//			txtCandlestick = new JTextField();
//			txtCandlestick.setEditable(false);
//			txtCandlestick.setColumns(10);
//			txtCandlestick.setBounds(0, 155, 17, 17);
//			pnlGameInfo.add(txtCandlestick);
//			
//			txtKnife = new JTextField();
//			txtKnife.setEditable(false);
//			txtKnife.setColumns(10);
//			txtKnife.setBounds(0, 172, 17, 17);
//			pnlGameInfo.add(txtKnife);
//			
//			txtLeadPipe = new JTextField();
//			txtLeadPipe.setEditable(false);
//			txtLeadPipe.setColumns(10);
//			txtLeadPipe.setBounds(0, 189, 17, 17);
//			pnlGameInfo.add(txtLeadPipe);
//			
//			txtRevolver = new JTextField();
//			txtRevolver.setEditable(false);
//			txtRevolver.setColumns(10);
//			txtRevolver.setBounds(0, 206, 17, 17);
//			pnlGameInfo.add(txtRevolver);
//			
//			txtRope = new JTextField();
//			txtRope.setEditable(false);
//			txtRope.setColumns(10);
//			txtRope.setBounds(0, 223, 17, 17);
//			pnlGameInfo.add(txtRope);
//			
//			txtWrench = new JTextField();
//			txtWrench.setEditable(false);
//			txtWrench.setColumns(10);
//			txtWrench.setBounds(0, 240, 17, 17);
//			pnlGameInfo.add(txtWrench);
//			
//			JLabel lblWrench = new JLabel("Wrench");
//			lblWrench.setBounds(27, 240, 175, 17);
//			pnlGameInfo.add(lblWrench);
//			
//			JLabel lblRope = new JLabel("Rope");
//			lblRope.setBounds(27, 223, 175, 17);
//			pnlGameInfo.add(lblRope);
//			
//			JLabel lblRevolver = new JLabel("Revolver");
//			lblRevolver.setBounds(27, 206, 175, 17);
//			pnlGameInfo.add(lblRevolver);
//			
//			JLabel lblLeadPipe = new JLabel("Lead Pipe");
//			lblLeadPipe.setBounds(27, 189, 175, 17);
//			pnlGameInfo.add(lblLeadPipe);
//			
//			JLabel lblCandlestick = new JLabel("Candlestick");
//			lblCandlestick.setBounds(27, 156, 175, 17);
//			pnlGameInfo.add(lblCandlestick);
//			
//			JLabel lblKnife = new JLabel("Knife");
//			lblKnife.setBounds(27, 172, 175, 17);
//			pnlGameInfo.add(lblKnife);
//			
//			JLabel lblRooms = new JLabel("Rooms");
//			lblRooms.setBounds(10, 268, 192, 17);
//			pnlGameInfo.add(lblRooms);
//			
//			txtBallroom = new JTextField();
//			txtBallroom.setEditable(false);
//			txtBallroom.setColumns(10);
//			txtBallroom.setBounds(0, 289, 17, 17);
//			pnlGameInfo.add(txtBallroom);
//			
//			txtBilliardRoom = new JTextField();
//			txtBilliardRoom.setEditable(false);
//			txtBilliardRoom.setColumns(10);
//			txtBilliardRoom.setBounds(0, 306, 17, 17);
//			pnlGameInfo.add(txtBilliardRoom);
//			
//			txtConservatory = new JTextField();
//			txtConservatory.setEditable(false);
//			txtConservatory.setColumns(10);
//			txtConservatory.setBounds(0, 323, 17, 17);
//			pnlGameInfo.add(txtConservatory);
//			
//			txtDiningRoom = new JTextField();
//			txtDiningRoom.setEditable(false);
//			txtDiningRoom.setColumns(10);
//			txtDiningRoom.setBounds(0, 340, 17, 17);
//			pnlGameInfo.add(txtDiningRoom);
//			
//			txtHall = new JTextField();
//			txtHall.setEditable(false);
//			txtHall.setColumns(10);
//			txtHall.setBounds(0, 357, 17, 17);
//			pnlGameInfo.add(txtHall);
//			
//			txtKitchen = new JTextField();
//			txtKitchen.setEditable(false);
//			txtKitchen.setColumns(10);
//			txtKitchen.setBounds(110, 289, 17, 17);
//			pnlGameInfo.add(txtKitchen);
//			
//			JLabel lblKitchen = new JLabel("Kitchen");
//			lblKitchen.setBounds(137, 289, 65, 17);
//			pnlGameInfo.add(lblKitchen);
//			
//			JLabel lblHall = new JLabel("Hall");
//			lblHall.setBounds(27, 357, 22, 17);
//			pnlGameInfo.add(lblHall);
//			
//			JLabel lblDiningRoom = new JLabel("Dining Room");
//			lblDiningRoom.setBounds(27, 340, 65, 17);
//			pnlGameInfo.add(lblDiningRoom);
//			
//			JLabel lblConservatory = new JLabel("Conservatory");
//			lblConservatory.setBounds(27, 323, 72, 17);
//			pnlGameInfo.add(lblConservatory);
//			
//			JLabel lblBallroom = new JLabel("Ballroom");
//			lblBallroom.setLabelFor(txtBallroom);
//			lblBallroom.setBounds(27, 290, 47, 17);
//			pnlGameInfo.add(lblBallroom);
//			
//			JLabel lblBilliardRoom = new JLabel("Billiard Room");
//			lblBilliardRoom.setBounds(27, 306, 65, 17);
//			pnlGameInfo.add(lblBilliardRoom);
//			
//			txtLibrary = new JTextField();
//			txtLibrary.setEditable(false);
//			txtLibrary.setColumns(10);
//			txtLibrary.setBounds(110, 306, 17, 17);
//			pnlGameInfo.add(txtLibrary);
//			
//			JLabel lblLibrary = new JLabel("Library");
//			lblLibrary.setBounds(137, 306, 65, 17);
//			pnlGameInfo.add(lblLibrary);
//			
//			txtLounge = new JTextField();
//			txtLounge.setEditable(false);
//			txtLounge.setColumns(10);
//			txtLounge.setBounds(110, 323, 17, 17);
//			pnlGameInfo.add(txtLounge);
//			
//			JLabel lblLounge = new JLabel("Lounge");
//			lblLounge.setBounds(137, 323, 65, 17);
//			pnlGameInfo.add(lblLounge);
//			
//			txtStudy = new JTextField();
//			txtStudy.setEditable(false);
//			txtStudy.setColumns(10);
//			txtStudy.setBounds(110, 340, 17, 17);
//			pnlGameInfo.add(txtStudy);
//			
//			JLabel lblStudy = new JLabel("Study");
//			lblStudy.setBounds(137, 340, 65, 17);
//			pnlGameInfo.add(lblStudy);
//		}
//	}
	
	public static void main(String[] args){

		try {
			new Client().run();
		}
		catch (Exception ex) {
			ex.printStackTrace();
		}

	}

}